public final class Purchase
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Purchase.PurchaseState
Possible purchase states.
|
| Constructor and Description |
|---|
Purchase(java.lang.String jsonPurchaseInfo) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object) |
java.lang.String |
getOriginalJson()
Returns a String in JSON format that contains details about the purchase order.
|
java.util.List<java.lang.String> |
getProducts()
Returns the product Ids.
|
int |
getPurchaseState()
Returns one of
Purchase.PurchaseState indicating the state of the purchase. |
long |
getPurchaseTime()
Returns the time the product was purchased,
in milliseconds since the epoch (Jan 1, 1970).
|
java.lang.String |
getPurchaseToken()
Returns a token that uniquely identifies a purchase for a given item and user pair.
|
int |
getQuantity()
Returns the quantity of the purchased product.
|
java.util.ArrayList<java.lang.String> |
getSkus()
Returns the list of SKUs.
|
int |
hashCode() |
java.lang.String |
toString() |
public Purchase(java.lang.String jsonPurchaseInfo)
throws org.json.JSONException
org.json.JSONExceptionpublic int getPurchaseState()
Purchase.PurchaseState indicating the state of the purchase.public long getPurchaseTime()
public java.lang.String getOriginalJson()
public java.lang.String getPurchaseToken()
public java.util.ArrayList<java.lang.String> getSkus()
public java.util.List<java.lang.String> getProducts()
public int getQuantity()
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object